<template>
  <div class="app-container">
    <div class="search-input-size" style="margin-bottom: 4px;">
      <el-input
        style="width: 10%"
        v-model="searchMobile"
        placeholder="请输入手机">
      </el-input>
      <el-input
        style="width: 10%"
        v-model="oddNumber"
        placeholder="请输入托运单号">
      </el-input>
      <el-date-picker
        v-model="createDate"
        type="datetimerange"
        range-separator="至"
        start-placeholder="开始时间"
        end-placeholder="结束时间"
        value-format="yyyy-MM-dd HH:mm:ss">
      </el-date-picker>
      <el-button type="primary" icon="el-icon-search" @click="search()">查询</el-button>
      <el-button type="primary" icon="el-icon-close" @click="cancelOrder()">取消订单</el-button>
      <el-button type="primary" icon="el-icon-download" @click="downloadOrders()">导出已选订单</el-button>
      <el-button type="primary" icon="el-icon-download" @click="downloadInfo()">信息导出</el-button>
      <el-button type="primary" icon="el-icon-search" @click="enterInfo()">物流信息录入</el-button>
      <!--<el-button size="small" @click="sendSokcet()">通知</el-button>-->
    </div>
    <el-table ref="multipleTable" :data="list" v-loading="listLoading" element-loading-text="Loading" border fit highlight-current-row @select="checkSelect" @select-all="selectAll" id="allData">
      <el-table-column type="selection" width="55">
      </el-table-column>
      <el-table-column label="订单号">
        <template slot-scope="scope">
           <span v-if="scope.row.isRead==0">
              <div  @click="read(scope.$index, scope.row)"><el-badge is-dot class="item" type="primary">
              {{scope.row.orderNo}}
            </el-badge>
          </div>
          </span>
          <span v-if="scope.row.isRead==1">{{scope.row.orderNo}}</span>
        </template>
      </el-table-column>
      <el-table-column label="托运单号">
        <template slot-scope="scope">
          {{scope.row.oddNumber}}
        </template>
      </el-table-column>
      <el-table-column label="客户姓名">
        <template slot-scope="scope">
          {{scope.row.sendName}}
        </template>
      </el-table-column>
      <el-table-column label="手机号">
        <template slot-scope="scope">
          <span>{{scope.row.sendPhone}}</span>
        </template>
      </el-table-column>
      <el-table-column label="寄件人公司">
        <template slot-scope="scope">
          <span>{{scope.row.sendCompany}}</span>
        </template>
      </el-table-column>
      <el-table-column label="运输方式">
        <template slot-scope="scope">
          <!-- <span>{{scope.row.transport == 1 ? '空运' : '陆运'}}</span> -->
          <span>{{scope.row.transport == 1 ? '' : '空运'}}</span>
        </template>
      </el-table-column> 
      <el-table-column label="包裹件数">
        <template slot-scope="scope">
          <span>{{scope.row.goodsNumber}}</span>
        </template>
      </el-table-column>
      <el-table-column label="备品件数">
        <template slot-scope="scope">
          <span>{{scope.row.backNumber}}</span>
        </template>
      </el-table-column>
      <el-table-column label="重量(kg)">
        <template slot-scope="scope">
          <span>{{scope.row.weight}}</span>
        </template>
      </el-table-column>
      <el-table-column label="收件人信息">
        <template slot-scope="scope">
          <span class="redvl" v-if="scope.row.receiveAddress.indexOf('北京')!=-1">{{scope.row.receiveAddress}}</span>
          <span class="redvl" v-else-if="scope.row.receiveAddress.indexOf('上海')!=-1">{{scope.row.receiveAddress}}</span>
          <span v-else>{{scope.row.receiveAddress}}</span>
        </template>
      </el-table-column>
      <el-table-column label="合作单位信息">
        <template slot-scope="scope">
          <span>{{scope.row.unitsInfo}}</span>
        </template>
      </el-table-column>
      <el-table-column label="路由信息">
        <template slot-scope="scope">
          <!-- <span>{{scope.row.routingInfo}}</span> -->
          <el-button @click="queryRoute(scope.row.id,scope.row.oddNumber)">查看路由</el-button>
        </template>
      </el-table-column>
      <el-table-column label="创建时间">
        <template slot-scope="scope">
          <span>{{scope.row.createDate}}</span>
        </template>
      </el-table-column>
      <el-table-column label="是否有台车">
        <template slot-scope="scope">
          <span v-if="scope.row.useCar==0">否</span>
          <span v-else-if="scope.row.useCar==1">是</span>
        </template>
      </el-table-column>
      <el-table-column label="是否整单">
        <template slot-scope="scope">
          <span v-if="scope.row.wholeOrder==0">否</span>
          <span v-else-if="scope.row.wholeOrder==1">是</span>
        </template>
      </el-table-column>
     <!-- <el-table-column label="是否取消订单">
        <template slot-scope="scope">
          <span v-if="scope.row.status==1">否</span>
          <span v-else-if="scope.row.status==9">是</span>
          <span v-else-if="scope.row.status==0">无效</span>
        </template>
      </el-table-column>-->
      <el-table-column label="更新时间">
        <template slot-scope="scope">
          <span >{{scope.row.updateDate}}</span>
        </template>
      </el-table-column>
      <el-table-column label="取件时间">
        <template slot-scope="scope">
          <span >{{scope.row.receiveDate}}</span>
        </template>
      </el-table-column>
<!--      <el-table-column label="打包照片">
        <template scope="scope">
          <img v-for="item in scope.row.pics" :src="picPath + item" width="30" height="30" float="left" @click="showBigImg(picPath+item)"/>
&lt;!&ndash;          <img v-for="item in scope.row.pics" :src="item" width="30" height="30" float="left" @click="showBigImg(item)"/>&ndash;&gt;
        </template>
      </el-table-column>-->
      <el-table-column label="借用人">
        <template slot-scope="scope">
          <span >{{scope.row.borrower}}</span>
        </template>
      </el-table-column>
      <el-table-column label="备注">
        <template slot-scope="scope">
          <span >{{scope.row.remark}}</span>
        </template>
      </el-table-column>
      <el-table-column label="操作">
        <template slot-scope="scope">
          <el-button size="mini" @click="handleEdit(scope.$index, scope.row,'edit')">编辑</el-button>
          <!-- <el-button size="mini" @click="handleEdit(scope.$index, scope.row,'del')">删除</el-button> -->
        </template>
      </el-table-column>
    </el-table>
    <div style="margin-top: 4px;">
      <el-pagination
        background
        layout="total, prev, pager, next"
        :page-size="pageSize"
        :current-page="pageNum"
        :total="pageTotal"
        @current-change="pageChange">
      </el-pagination>
    </div>
     <!--查看 路由信息弹窗-->
     <el-dialog
          :visible.sync="logisticsVisible"
          title="物流信息"
          width="50%">
        <div v-if="logisticsInfo.length">
          <el-timeline style="margin-left:30px;" >
            <el-timeline-item
                v-for="(item, index) in logisticsInfo"
                :key="index"
                :timestamp="parseTime(item.tranTime)"
                >
               
              <span>
                <el-input v-model="item.status" placeholder="请填写状态信息" :readonly="!isButtonVisible"></el-input>
                <el-input v-model="item.addr" placeholder="请填写地址信息" :readonly="!isButtonVisible"></el-input>
                 <!-- <span>{{item.status}} &nbsp;&nbsp;</span><br/> -->
                <!-- <span>{{parseTime(item.tranTime)}}&nbsp;&nbsp;</span><br/>  placement="top" -->
               <!-- <span>{{item.addr}}</span><br/> -->
               <el-button v-show="isButtonVisible" type="primary" @click="updateRout(item)">确 定</el-button>
              </span>
            </el-timeline-item>
          </el-timeline>
          
        </div>
        <div v-else>
          暂无物流信息
        </div>
        <span slot="footer" class="dialog-footer">
          <el-button type="primary" @click="editRout()">编 辑</el-button>
          <el-button @click="logisticsVisible = false;isButtonVisible=false">关闭</el-button>
        </span>
        
      </el-dialog>
   <!-- 订单信息弹窗-->
   <el-dialog title="路由信息" :visible.sync="dialogFormVisible" width="50%">
      <el-form :model="form">
        <el-form-item label="托运单号" :label-width="formLabelWidth">
          <el-input v-model="form.oddNumber" :disabled="true"></el-input>
        </el-form-item>
       
        <el-form-item label="合作单位信息" :label-width="formLabelWidth">
          <el-input v-model="form.unitsInfo"></el-input>
        </el-form-item>
       
      <el-form-item label="备品件数" :label-width="formLabelWidth">
          <el-input v-model="form.backNumber"></el-input>
        </el-form-item>
        <el-form-item label="重量(kg)" :label-width="formLabelWidth">
          <el-input v-model="form.weight"></el-input>
        </el-form-item>
        <el-form-item label="备注" :label-width="formLabelWidth">
          <el-input v-model="form.remark"></el-input>
        </el-form-item>
        <el-form-item label="路由信息" :label-width="formLabelWidth">
          <el-input v-model="form.routingInfo" placeholder="请填写路由信息" type="textarea" rows="5"></el-input>
        </el-form-item>

      </el-form>
     
      <div slot="footer" class="dialog-footer">
        <el-button @click="dialogFormVisible = false;cancel()">取 消</el-button>
        <el-button type="primary" @click="saveRectipt()">更 新</el-button>
      </div>

    </el-dialog>
    <el-dialog  :visible.sync="bigImgVisible">
      <img :src="this.bigImgUrl" />
    </el-dialog>
    <!--导出数据弹窗-->
    <el-dialog :visible.sync="deriveVisible">
      <span>支付时间：</span>
      <el-date-picker
        v-model="deriveDate"
        type="datetimerange"
        :default-time="['00:00:00','23:59:59']"
        range-separator="至"
        start-placeholder="开始日期"
        end-placeholder="结束日期">
      </el-date-picker>
      <span> 当前状态：</span>
      <el-select v-model="exportStatus" clearable  placeholder="请选择状态">
        <el-option label="观察期" value="4" key="4"></el-option>
        <el-option label="生效" value="5" key="5"></el-option>
      </el-select>
      <div>
        <span>保险数据：</span>
        <el-button type="primary" @click="orderExcelDownload()" plain>下载保险Excel</el-button>
      </div>
      <div>
        <span>订单数据：</span>
        <el-button type="primary" @click="loadData()" plain>加载数据</el-button>
        <el-button type="primary" @click="downloadExcel('partData')" plain>部分导出</el-button>
        <el-button type="danger" @click="downloadExcel('allData')" plain>全部导出</el-button>
      </div>
    </el-dialog>
  </div>
</template>
<style>
  .item {
    margin-top: 10px;
    /* margin-right: 20px; */
  }
  .redvl{
    color: #EA1B29;
  }
</style>

<script>
  import { orderApi } from '@/api/order'
  import { rectiptApi } from '@/api/userRectipt'
  import { socketApi } from '@/api/socket'
  import {parseTime} from '@/utils/index'
  import FileSaver from 'file-saver'
  import XLSX from 'xlsx'

  export default {
    data() {
      return {
        pageNum: 1, // 当前页
        pageSize: 10, // 每页数
        pageTotal: 0, // 总页数
        list: null,
        listLoading: true,
        dialogFormVisible: false,
        dialogFormTitle: '',
        formLabelWidth: '100px',
        form: {
          recriptId: 0
        },
        codeDisabled: true,
        authVisible: false,
        bigImgVisible: false,
        bigImgUrl:'',
        searchMobile: '',
        oddNumber: '',
        createDate:'',
        orderStatus: '',
        exportStatus: null,
        observeVisible: false,
        partData:null,//部分数据导出的集合
        allData:null,//全部数据导出的集合
        deriveVisible: false,
        deriveDate: null,
        downFlag:true,
        downType:null,
        downIds:[],
        returnVisible:false,
        returnForm:{},
        setMealList: [],
        selectSetMealId: "",
        picPath: "",
        logisticsInfo : [],
        logisticsVisible:false,
        logisticsIndx:0,
        routForm:{},
        routData:[
          {status: '', addr: '', tranTime: ''}
        ],
        isButtonVisible: false,
      }
    },
    filters: {
    },
    created() {
      this.beforeDestroy()
      this.fetchData()
      this.loadTime()
      // this.initSocket()
    },
    methods: {
      fetchData() {
        this.listLoading = true
        orderApi.getList(this.pageNum, this.pageSize).then(response => {
          this.list = response.list
          this.listLoading = false
          this.pageTotal = response.total
          this.pageNum = response.pageNum
          this.picPath = 'http://exp.lbt56.cn/exp/web/static/upload/'+this.getDate();
        })
      },
      getDate() {
        var date = new Date();
        var seperator1 = "-";
        var year = date.getFullYear();
        var month = date.getMonth() + 1;
        var strDate = date.getDate();
        if (month >= 1 && month <= 9) {
          month = "0" + month;
        }
        if (strDate >= 0 && strDate <= 9) {
          strDate = "0" + strDate;
        }
        var currentdate = year  + month + "/" + strDate +"/";
        return currentdate;
      },
      // 取消订单
      cancelOrder() {
        console.log(this.$refs.multipleTable.selection)
        const selectedData = this.$refs.multipleTable.selection
        if (selectedData.length <= 0) {
          this.$message({
            type: 'info',
            message: '请选择至少一行数据'
          })
          return
        }
        let ids = ''
        for (let i = 0; i < selectedData.length; i++) {
          ids += selectedData[i].id + ','
        }
        if (ids.length > 0) {
          ids = ids.substring(0, ids.length - 1)
        }
        this.$confirm('确认取消选中' + selectedData.length + '条订单数据', '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(() => {
          orderApi.cancelOrder(ids).then(response => {
            this.$message({
              type: 'success',
              message: '订单已经取消'
            })
            this.fetchData()
          })
        })
      },
      // 订单物流信息录入
      enterInfo() {
        console.log(this.$refs.multipleTable.selection)
        const selectedData = this.$refs.multipleTable.selection
        if (selectedData.length <= 0) {
          this.$message({
            type: 'info',
            message: '请选择至少一行数据'
          })
          return
        }
        let ids = ''
        for (let i = 0; i < selectedData.length; i++) {
          ids += selectedData[i].id + ','
        }
        if (ids.length > 0) {
          ids = ids.substring(0, ids.length - 1)
        }
        this.$confirm('确认取消选中' + selectedData.length + '条订单数据', '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(() => {
          orderApi.cancelOrder(ids).then(response => {
            this.$message({
              type: 'success',
              message: '订单已经取消'
            })
            this.fetchData()
          })
        })
      },
      queryRoute(id,orderNo) {
        console.log(orderNo);
        rectiptApi.getRouthList(orderNo, 'order',{}).then(response => {
          console.log(response)
          this.logisticsInfo = response.data == null ? [] : response.data
          this.recriptId = id;
          console.log("recriptId=",this.recriptId)
          this.logisticsVisible = true
          response.data.forEach(item => {
              this.logisticsIndx += 1;
              this.logisticsInfo.push({id:indx,status:item.status,addr:item.addr,tranTime:parseTime(item.tranTime)});
          })
         
          this.routData = [];
          this.routData.push({id:this.logisticsIndx+1,status: '', addr: '', tranTime: ''});
        }).catch((error) => {
           console.log(error.message);
        })
      },
      //保存物流信息
      saveRectipt(){
        this.form.recriptId = this.form.id;
        this.form.infosList = this.routData;
        if(this.form.routingInfo==undefined || this.form.routingInfo.length <=0){
              this.$message({
                type: 'info',
                message: '请填写路由信息'
              })
              return false;
          }
          this.form.remark = "订单信息";
          rectiptApi.saveRout(this.form).then(response => {
            this.authVisible = false
            this.dialogFormVisible = false
            this.fetchData()
            if(response.message!=undefined){
              this.$message({
                type: 'info',
                message: response.message
              })
            } else {
              this.$message({
              type: 'success',
              message: '录入成功'
            })
            this.fetchData()
          }
        })    
       
      },
      editRout(){
        this.isButtonVisible = true;
      },
      updateRout(obj){
        const data = {"id": obj.id,"status": obj.status,"addr": obj.addr,"tranTime": obj.tranTime}
        obj.createDate = parseTime(obj.createDate)
        obj.updateDate = parseTime(new Date())
        rectiptApi.updateRout(obj).then(response => {
          console.log(response)
          this.isButtonVisible = false;
        }).catch((error) => {
           console.log(error.message);
        })
      },
      //更新备注
      updateNotes(){
        console.log(this.form)
        orderApi.updateNotes(this.form).then(response => {
          this.authVisible = false
          this.dialogFormVisible = false
          this.fetchData()
        })
      },
      handleEdit(index, row, type){
        this.form = row
        this.form.handStr="update";
        if(type=='edit'){
          this.codeDisabled = true
          this.dialogFormTitle = '编辑'
          this.dialogFormVisible = true
        }else if(type=='del'){
          this.$confirm('确认删除该条记录吗？', '提示', {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
            type: 'warning'
          }).then(() => {
            rectiptApi.del(row.id).then(response => {
              this.$message({
                type:'success',
                message: '删除成功!'
              });
              this.fetchData()
            })
          });
        }
      },
      // 导出订单
      downloadOrders() {
        const selectedData = this.$refs.multipleTable.selection;
        let url = "";
        if (selectedData.length <= 0) {
           url = '<a style="color:blue;" href="' + this.getUrl() + '/sysOrder/export?userId=' + 1 + '">导出订单</a>'
        } else {
          let ids = ''
          for (let i = 0; i < selectedData.length; i++) {
              ids += ids.length==0?'ids='+selectedData[i].id:'&ids='+selectedData[i].id
          }
           url = '<a style="color:blue;" href="' + this.getUrl() + '/sysOrder/export?' + ids + '">导出订单</a>'
        }
        this.$notify({ title: '请点击导出订单 ', dangerouslyUseHTMLString: true, message: url })
      },
      // 获取请求路径
      getUrl() {
        let baseurl = ''
        if (this.$el.baseURI.indexOf('localhost') != -1) {
          baseurl = 'http://localhost:8081/express'
        }else if (this.$el.baseURI.indexOf('127.0.0.1') != -1) {
          baseurl = 'http://127.0.0.1:8081/express'
        } else {
          baseurl = 'http://exp.lbt56.cn/express'
        }
        return baseurl
      },
      pageChange(val) {
        this.pageNum = val
        if(this.searchMobile==''&&this.orderStatus==''){
          this.fetchData();
        }else{//带条件翻页
          this.search();
        }
      },
      showBigImg(url){
        this.bigImgVisible=true
        this.bigImgUrl=url
      },
      //时间格式化
      parseTime(time,cFormat) {
        if(time == null) return null;
        return parseTime(time, cFormat)
      },
      //条件分页检索订单列表
      search(){
        let data = {
          pageNum:this.pageNum,
          pageSize:this.pageSize,
          mobile:this.searchMobile,
          date:this.createDate,
          oddNumber:this.oddNumber
        };
        orderApi.search(data).then(response => {
          console.log(response);
          this.list = response.list;
          this.listLoading = false;
          this.pageTotal = response.total;
          this.pageNum = response.pageNum
        })
      },
      notifyOrder() {
        orderApi.notifyMsg().then(response => {
          if(response.data!=undefined && response.data!=''){
            // this.initSocket();
            let msg1 = '你有新快件订单了，请留意！寄件人电话： '+response.data
            this.$notify({ title: '新订单提示', dangerouslyUseHTMLString: true, message: msg1 })
            this.fetchData()
          }
        })
      },
      sendSokcet(){
        // socketApi.getWebsocket("1111 is send")
        // 弹出导出
        this.deriveVisible = true
      },
      onmessage(d){
        if(d!=undefined && d!='' && d.data!=undefined) {
          let msg1 = '你有新快件订单了，请留意！寄件人电话： ' + d.data
          this.$notify({ title: '新订单提示', dangerouslyUseHTMLString: true, message: msg1 })
          this.fetchData()
        }
      },
      initSocket(){
        // var that = this;
        socketApi.initWebSocket(this,"users");
      },
      loadTime() {
        this.timer = setInterval(this.notifyOrder, 3000);
      },
      beforeDestroy() {
        clearInterval(this.timer);
        //if (this.socket) this.socket.disconnect();
      },
      read(index, row){
        this.form = row;
        orderApi.read(this.form).then(response => {
          this.authVisible = false
          this.dialogFormVisible = false
          this.$message({'message':'已经查阅订单成功，并发送微信消息通知用户',type: 'success'});
          this.fetchData()
        })
      },
      // 加载excel表格数据
      loadData() {
        this.partData = null;
        this.allData = null;
        console.log(this.deriveDate);
        if(this.exportStatus == null || this.deriveDate == null){
          this.$message({
            message: '请选择需要查询的状态或时间',
            type: 'error'
          });
          return false;
        }
        let data = {
          pageNum:1,
          pageSize:9999,//默认导出所有订单
          status:this.exportStatus,
          startTime:this.deriveDate[0],
          endTime:this.deriveDate[1],
          payTimeDESC:'ASC',
        };
        orderApi.getList(1,9999,data).then(response => {
          if(response.list == null){
            this.$message({
              message: '查询数据为空，请重新选择时间或状态',
              type: 'error'
            });
          }else{
            let DataList = response.list;
            for(let i =0; i<DataList.length; i++){
              if(DataList[i].payType=='WX'){
                DataList[i].payType = '微信'
              }else if(DataList[i].payType=='ZFB'){
                DataList[i].payType = '支付宝'
              }
              DataList[i].idCard = '`'+DataList[i].idCard;
              DataList[i].postalCode = '`'+DataList[i].postalCode;
            }
            this.partData = DataList;
            this.allData = DataList;
            //this.downloadExcel(type);
            this.$message({
              message: '加载成功，现在可以导出excel表格了',
              type: 'success'
            });
          }
        })
      },
      downloadExcel(id){
        /* generate workbook object from table */
        let wb = XLSX.utils.table_to_book(document.querySelector('#'+id),{raw:true});
        /* get binary string as output */
        let wbout = XLSX.write(wb, { bookType: 'xlsx', bookSST: true, type: 'array'});
        let fileName = '导出数据';
        if(id == 'partData'){
          fileName = '慧延保订单支付信息';
        }else if(id == 'allData'){
          fileName = '慧延保订单数据汇总';
        }
        try {
          FileSaver.saveAs(new Blob([wbout], { type: 'application/octet-stream' }), fileName + parseTime(new Date(),' {y}-{m}-{d}')+'.xlsx',null)
        } catch (e) { if (typeof console !== 'undefined') console.log(e, wbout) }
        return wbout;
      },
      orderExcelDownload(){
        console.log(this.deriveDate);
        if(this.deriveDate == null){
          this.$message({
            message: '请选择需要查询的时间',
            type: 'error'
          });
        }
        let data = {
          startTime:parseTime(this.deriveDate[0],null),
          endTime:parseTime(this.deriveDate[1],null)
        };
        orderApi.orderExcelDownload(this.getUrl(),data);
      },
      getGoodType(type,quota){
        let types = {"1":"日用品","2":"数码产品","3":"备品","4":"食物","5":"文件","0":"其他"}
        return types[type];
      },
      ANLCardDownload(orderId){
        //orderApi.ANLCardDownload(this.getUrl(),orderId);
        let url = '<a style="color:blue;" target="_blank" href="' + this.getUrl() + '/sysOrder/ANLCardDownload?orderId='+orderId+'">下载保修卡</a>'
        this.$notify({
          dangerouslyUseHTMLString: true,
          message: url
        });
      },
      batchDownload(){
        if(!this.downFlag){
          this.warnMsg("只有审核后的订单才能生成,请检查");
          return;
        }
        if(this.downType==null){
            this.warnMsg("请选择要批量下载的类型");
            return;
        }
        if(this.downIds==null || this.downIds.length==0){
          this.warnMsg("请选择要批量下载的订单");
          return;
        }

        orderApi.batchDownload(this.getUrl(),this.downType, this.downIds).then(response => {
          console.log(response);
        })
      },
      warnMsg(msg){
        this.$message({
          message: msg,
          type: 'warning'
        });
      },
      openReturnDialog(){
        if(this.$refs.multipleTable.selection.length != 1){
            this.warnMsg("请选中单条数据进行操作！");
            return;
        }
        let data = this.$refs.multipleTable.selection[0];
        if(data.status < 1){
          this.warnMsg("当前订单不能退款！");
          return;
        }
        this.setMealList = null;
        this.returnForm = null;
        orderApi.getAllSetMeal(data).then(response => {
          console.log(response);
          this.form = data;
          this.setMealList = response.data;
          this.returnForm = this.form;
          this.returnVisible = true;
        });
      },
      //信息导出
      downloadInfo(){
        const selectedData = this.$refs.multipleTable.selection
        if (selectedData.length <= 0) {
          this.$message({
            type: 'info',
            message: '请选择至少一行数据'
          })
          return
        }
        this.warnMsg("信息导出");
      }
    }
  }
</script>
